package com.sdry.web.controller.task;

import java.net.MalformedURLException;
import java.util.*;
import java.util.Timer;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.springframework.web.context.support.WebApplicationContextUtils;

import com.sdry.service.llm.UserReportService;

public class MyListener1 implements ServletContextListener {

	private Timer timer = null;

	public void contextInitialized(ServletContextEvent event) {
		timer = new Timer(true);
		// 设置任务计划，启动和间隔时间
		if(true){
//			timer.schedule(new MsgTask1(),getTime());
		}
		
	}

	public void contextDestroyed(ServletContextEvent event) {
		timer.cancel();
	}
    public Date getTime(){
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 30);
        calendar.set(Calendar.SECOND, 00);
        Date time = calendar.getTime();
        
        return time;
    }
}
